package com.dhcc.core.modules.system.warpper;

import java.util.Map;

import com.dhcc.core.config.properties.SysProperties;
import com.dhcc.core.framework.base.warpper.BaseControllerWarpper;
import com.dhcc.core.modules.system.cache.config.ConfigCache;

/**
 * 参数配置的包装
 * 
 * @ClassName: ConfigWarpper
 * @Description: TODO
 * @author: cyf
 * @date: 2018年1月2日 上午10:43:21
 */
public class ConfigWarpper extends BaseControllerWarpper {

    public ConfigWarpper(Object list) {
        super(list);
    }


    @Override
    public void warpTheMap(Map<String, Object> map) {
        Long categoryId = (Long) map.get("categoryId");
        if(categoryId==0){
            map.put("categoryName", SysProperties.me().getOrgFullName());
        }else{
            map.put("categoryName", ConfigCache.me().getCategoryNameById(categoryId));
        }
    }

}
